﻿@model MvcEasyProject.ViewModels.UsersPageModel
@{
    ViewBag.Title = "Index";
}

<!-- BEGIN ADVANCED TABLE widget-->
<div class="row-fluid">
    <div class="span12">
        <!-- BEGIN EXAMPLE TABLE widget-->
        <div class="widget">
            <div class="widget-title">
                <h4><i class="icon-reorder"></i>Editable Table</h4>
                <span class="tools">
                    <a href="javascript:;" class="icon-chevron-down"></a>
                    <a href="javascript:;" class="icon-remove"></a>
                </span>
            </div>
            <div class="widget-body">
                <div class="portlet-body">
                    <div class="clearfix">
                        <div class="btn-group">
                            <button id="sample_editable_1_new" class="btn green">
                                Add New <i class="icon-plus"></i>
                            </button>
                        </div>
                        <div class="btn-group pull-left">
                            <button class="btn dropdown-toggle" data-toggle="dropdown">
                                Tools <i class="icon-angle-down"></i>
                            </button>
                            <ul class="dropdown-menu pull-left">
                                <li><a href="#">Print</a></li>
                                <li><a href="#">Save as PDF</a></li>
                                <li><a href="#">Export to Excel</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="space15"></div>
                    <table class="table table-striped table-hover table-bordered" id="sample_editable_1">
                        <thead>
                            <tr>
                                <th>User Id</th>
                                <th>User Name</th>
                                <th>Password</th>
                                <th>Worker Id</th>
                                <th>Active</th>
                                <th>Edit</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var user in Model.Users)
                            {
                                bool check = user.Active!=null?user.Active:false;
                                <tr class="">
                                    <td>@user.Id.ToString()</td>
                                    <td>@user.UserName.ToString()</td>
                                    <td>@user.Password.ToString()</td>
                                    <td >@user.WorkerId.ToString()</td>
                                    <td class="center">@user.Active</td>
                                    <td><a class="edit" href="javascript:;">Edit</a></td>
                                    <td><a class="cancel" href="javascript:;"></a></td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!-- END EXAMPLE TABLE widget-->
    </div>
</div>

<!-- END ADVANCED TABLE widget-->
